<template>
	<view>
		<uni-card v-for="(item,index) in testList" :key="index">
			<template v-slot:title>
				<uni-list>
					<uni-list-item>
						<template v-slot:header>
							<text>{{item.studentName}}</text>
						</template>
								
						<template v-slot:footer>
							<uni-tag v-if="item.isPass" type="success" text="完成"></uni-tag>
							<uni-tag v-else type="error" text="未完成"></uni-tag>
						</template>
					</uni-list-item>
				</uni-list>
			</template>
			<view>
				<text>备注：{{item.remark !== null ? item.remark : ''}}</text>
			</view>
		</uni-card>
	</view>
</template>

<script>
	import classTest from '@/api/modules/classTest'; 
	
	export default {
		data() {
			return {
				testList : []
			}
		},
		onLoad(options) {
			classTest.getClassroomTestRecord (options.classId,options.testId).then(res=> {
				this.testList = res.data;
			})
		},
		methods: {
			
		}
	}
</script>

<style>

</style>
